# SPDX-FileCopyrightText: 2023-2024 The LineageOS Project
# SPDX-License-Identifier: Apache-2.0

ifeq ($(PRODUCT_VIRTUAL_AB_OTA),true)
    BOARD_PRODUCTIMAGE_MINIMAL_PARTITION_RESERVED_SIZE ?= true
endif

ifneq ($(WITH_GMS),true)
    BOARD_PRODUCTIMAGE_EXTFS_INODE_COUNT ?= -1

    ifeq ($(BOARD_PRODUCTIMAGE_MINIMAL_PARTITION_RESERVED_SIZE),true)
        ifeq ($(PRODUCT_IS_ATV),true)
            BOARD_PRODUCTIMAGE_PARTITION_RESERVED_SIZE ?= 450000000
        else
            BOARD_PRODUCTIMAGE_PARTITION_RESERVED_SIZE ?= 1188036608
        endif
    else
        ifeq ($(PRODUCT_IS_ATV),true)
            BOARD_PRODUCTIMAGE_PARTITION_RESERVED_SIZE ?= 470000000
        else
            BOARD_PRODUCTIMAGE_PARTITION_RESERVED_SIZE ?= 1957691392
        endif
    endif

    BOARD_SYSTEMIMAGE_EXTFS_INODE_COUNT ?= -1
    ifeq ($(PRODUCT_IS_ATV),true)
        BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE ?= 40000000
        BOARD_SYSTEM_EXTIMAGE_PARTITION_RESERVED_SIZE ?= 27000000
    else
        BOARD_SYSTEM_EXTIMAGE_EXTFS_INODE_COUNT ?= -1
        BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE ?= 94371840
        BOARD_SYSTEM_EXTIMAGE_PARTITION_RESERVED_SIZE ?= 94371840
    endif

endif
